<?php if (!defined('THINK_PATH')) exit();?><div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="<?php echo U(index);?>" method="post">
        <input type="hidden" name="pageCurrent"     value="<?php echo ($pageCurrent); ?>"/>
        <input type="hidden" name="pageSize"        value="<?php echo ($pageSize); ?>"/>
        <input type="hidden" name="orderField"      value="<?php echo ($_REQUEST['orderField']); ?>"/>
        <input type="hidden" name="orderDirection"  value="<?php echo ($_REQUEST['orderDirection']); ?>"/>
        <div class="bjui-searchBar">
            <label>搜索：</label>
            <input type="text" value="<?php echo ((isset($searchname) && ($searchname !== ""))?($searchname):""); ?>" name="searchname" class="form-control" size="10" />&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询</a>
            <a href="<?php echo U(add);?>" class="btn btn-green" data-toggle="dialog" data-width="600" data-height="500">添加用户</a>
            <div class="pull-right">
                <a href="<?php echo U(del);?>" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-idname="ids" data-group="ids" class="btn btn-red">删除选中</a>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent">
    <table data-toggle="tablefixed" data-width="100%" data-layout-h="0" >
        <thead>
            <tr>
                <th>ID</th>
                <th>用户名</th>
                <th>真实姓名</th>
                <th>默认数据医院</th>
                <th>所属医院</th>
                <th>所属部门</th>
                <th>登陆次数</th>
                <th>最后登录时间</th>
                <th>最后登录IP</th>
                <th>在线</th>
                <th>状态</th>
                <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th width="250">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php if(empty($list)): ?><td colspan="8" class="text-center">aOh! 暂时还没有内容!</td>
            <?php else: ?>
            <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                <td><?php echo ($vo["uid"]); ?></td>
                <td><?php echo ($vo["username"]); ?></td>
                <td><?php echo ($vo["realname"]); ?></td>
                <td><?php echo ($vo["hospital_name"]); ?></td>
                <td><?php echo ($vo["hospital_names"]); ?></td>
                <td><?php echo ($vo["depart_name"]); ?></td>
                <td><?php echo ($vo["login_times"]); ?></td>
                <td><?php echo (date("Y-m-d:h:i:s",$vo["last_login_time"])); ?></td>
                <td><?php echo long2ip($vo['last_login_ip']);?></td>
                <td><?php if($vo["online"] == 1): ?>在线<?php else: ?> --<?php endif; ?></td>
                <td><?php if($vo["status"] == 1): ?>启用<?php else: ?> 禁用<?php endif; ?></td>
                <td>
                    <input type="checkbox" name="ids" data-toggle="icheck" value="<?php echo ($vo["id"]); ?>"></td>
                    <td>
                        <a href="<?php echo U('edit',array('uid'=>$vo['uid']));?>" class="btn btn-green" data-on-load="dialog_onLoad"  data-toggle="dialog" data-width="500" data-height="400">编辑</a>
                        <a href="<?php echo U('auth/authGroup',array('uid'=>$vo['uid']));?>" class="btn btn-green"   data-toggle="dialog" data-width="500" data-height="400" data-title="<?php echo ($vo["realname"]); ?>菜单授权">菜单授权</a>
                        <a href="<?php echo U('userData',array('uid'=>$vo['uid']));?>" class="btn btn-green"   data-toggle="dialog" data-width="500" data-height="400" data-title="<?php echo ($vo["realname"]); ?>菜单授权">数据授权</a>
                        <a href="<?php echo U('del',array('ids'=> $vo['uid']));?>" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删
                        </a>
                    </td>
                </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>
            </tbody>
        </table>
    </div>
    <div class="bjui-pageFooter">
        <div class="pages">
            <span>每页&nbsp;</span>
            <div class="selectPagesize">
                <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                    <option value="<?php echo ($pageSize); ?>"><?php echo ($pageSize); ?></option>
                    <option value="10">10</option>
                    <option value="20">20</option>
                    <option value="30">30</option>
                    <option value="60">60</option>
                    <option value="100">100</option>
                </select>
            </div>
            <span>共<?php echo ($total); ?>条</span>
        </div>
        <div class="pagination-box" data-toggle="pagination" data-total="<?php echo ($total); ?>" data-page-size="<?php echo ($pageSize); ?>" data-page-current="<?php echo ($pageCurrent); ?>"></div>
    </div>